﻿package com.snzflash.events 
{
	import flash.events.Event;
	
	/**
	 * События медиа плееров
	 * @author firsoff maxim, tel: +79222345364, skype: maxim.firsoff
	 */
	public class MediaEvent extends Event 
	{
		
		public static const LOADING_PROGRESS:String = 'loading_progress';
		public static const PLAYING_PROGRESS:String = 'playing_progress';
		// при окончании проигрывания
		public static const STREAM_FINISH:String = 'stream_finish';
		//public static const STREAM_COMPLETE:String = 'stream_complete';
		// при инициализации видео
		public static const VIDEO_INIT:String = 'video_init';
		
		
		public var data:Object;
		
		public function MediaEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, data:Object = null) 
		{ 
			this.data = data;
			super(type, bubbles, cancelable);
			
		} 
		
		public override function clone():Event 
		{ 
			return new MediaEvent(type, bubbles, cancelable, data);
		} 
		
		public override function toString():String 
		{ 
			return formatToString("MediaEvent", "type", "bubbles", "cancelable", "eventPhase"); 
		}
		
	}
	
}